import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'

const router = createRouter({
  // history: createWebHistory(import.meta.env.BASE_URL),
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/home',
    },
    {
      path: '/login',
      name: 'Login',
      component: () => import( '../views/Login.vue')
    },
    {
      path: '/home',
      name: 'Home',
      component: Home,
    },
    {
      path: '/classify',
      name: 'Classify',
      component: () => import('../views/Classify.vue'),
    },
    {
      path: '/goods',
      name: 'Goods',
      component: () => import('../views/Goods.vue'),
    },
    {
      path: '/member',
      name: 'Member',
      component: () => import('../views/Member.vue'),
    },
    {
      path: '/order',
      name: 'Order',
      component: () => import('../views/Order.vue'),
    },
  ],
})

export default router
